package com.zhuss.controller.repair;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.zhuss.bean.bo.food.food.CreateFoodBo;
import com.zhuss.bean.bo.food.food.DeleteFoodBo;
import com.zhuss.bean.bo.food.food.DetailFoodBo;
import com.zhuss.bean.bo.food.food.StartFoodBo;
import com.zhuss.bean.bo.food.food.StopFoodBo;
import com.zhuss.bean.bo.food.food.UpdateFoodBo;
import com.zhuss.bean.bo.repair.repair.BackRepairBo;
import com.zhuss.bean.bo.repair.repair.DeleteRepairBo;
import com.zhuss.bean.bo.repair.repairAudit.RepairAuditFanKuiBo;
import com.zhuss.bean.bo.repair.repairAudit.RepairAuditPaiDanBo;
import com.zhuss.bean.bo.repair.repairAudit.RepairAuditQianShouBo;
import com.zhuss.bean.bo.repair.repairAudit.RepairAuditPaiDanBackBo;
import com.zhuss.bean.bo.repair.repairAudit.RepairWuyeBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.SelectVo;
import com.zhuss.exception.WpsException;
import com.zhuss.repair.repair.RepairAuditOperateService;


/**
 * 报修操作 controller
 * @Author hxx
   @Date 2020/03/02 16:01
 *
 */
  
 
@RestController
@RequestMapping("/repairAudit")
public class RepairAuditOperateController extends BaseController {
	
	@Autowired
	@Qualifier("repairAuditOperateService")
	private RepairAuditOperateService repairAuditOperateService;
	
	
/*	@ResponseBody
    @PostMapping("/list")
    public Object list(@RequestBody SearchRepairAuditBo bo) throws WpsException {
		
		Object result = repairAuditOperateService.list(bo);
		return result;
    }*/
	
	/**
	 * 反馈
	 */
	@ResponseBody
    @PostMapping("/fanKui")
    public void create(@RequestBody RepairAuditFanKuiBo bo) throws WpsException {
		repairAuditOperateService.fanKui(bo);
    }
	
	/**
	 * 签收
	 */
	@ResponseBody
    @PostMapping("/qianShou")
    public void delete(@RequestBody RepairAuditQianShouBo bo) throws WpsException {
		repairAuditOperateService.qianShou(bo);
    }
	

	/**
	 * 派单
	 */
	@ResponseBody
    @PostMapping("/paiDan")
    public void back(@RequestBody RepairAuditPaiDanBo bo) throws WpsException {
		repairAuditOperateService.paiDan(bo);
    }
	
	/**
	 * 撤回派单
	 */
	@ResponseBody
    @PostMapping("/paiDanBack")
    public void update(@RequestBody RepairAuditPaiDanBackBo bo) throws WpsException {
		repairAuditOperateService.paiDanBack(bo);
    }
	
	/**
	 * 获取物业公司 type area
	 */
	@ResponseBody
	@PostMapping("/getRepairWuye")
	public List<SelectVo> getRepairWuye(@RequestBody RepairWuyeBo bo) throws WpsException {
		 return repairAuditOperateService.getRepairWuye(bo);
	}
	/**
	 * 获取物业公司所有维修人员
	 */
	@ResponseBody
	@PostMapping("/getRepairUsersByWuye")
	public List<SelectVo> getRepairUsersByWuye(@RequestBody RepairWuyeBo bo) throws WpsException {
		return repairAuditOperateService.getRepairUsersByWuye(bo);
	}


	
}
